package org.komarichin.beans.dao;

import org.komarichin.beans.IRole;
import org.komarichin.beans.IUser;

import java.io.Serializable;
import java.util.Collection;

/**
 * User: Michael Komarichin
 * Date: 05.10.2009
 * Time: 10:43:47
 */
public interface IUserDAO extends Serializable {
    IUser save(IUser user);

    void remove(IUser user);

    void update(IUser user);

    IUser login(String login, String password);

    public IUser findByName(String login);

    Collection<IUser> getAllowUsers(Long permission);

    IRole getUserRole(IUser user);

    Collection<IUser> getAll();

    IUser newInstanceUser(Long id, String login, String password, String hint);
}
